Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm: backdate generated CAs #118922

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

champtar
Copy link
Contributor

@champtar champtar commented Jun 28, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

When running kubeadm / installing k8s early during boot, the CA certificate can be generated before time is synchronised and time is jumped backward.
Make notBefore 5 min in the past to accept small clock jump.

Which issue(s) this PR fixes:

Special notes for your reviewer:

new version of #118631

Does this PR introduce a user-facing change?

kubeadm: generate CA certificates with a start time that is offset 5 minutes in the past relative to the current system time to workaround cases of clock desync.
client-go: allow to set NotBefore in NewSelfSignedCACert()

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
This allow for a small time jump backward after
certificates generation.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 28, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @champtar. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/kubeadm sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 28, 2023
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/ok-to-test

thanks

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 28, 2023
@aojea
Copy link
Member

aojea commented Jun 28, 2023

/lgtm

/assign @sttts @deads2k

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 28, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: bd917f911ef8d48f22deb5b8071007cf69a978cc

@neolit123
Copy link
Member

/release-note-edit

kubeadm: generate CA certificates with a start time that is offset 5 minutes in the past relative to the current system time to workaround cases of clock desync.
client-go: allow to set NotBefore in NewSelfSignedCACert()

highlighting the user facing change (kubeadm) first as per the slack discussion.

@deads2k
Copy link
Contributor

deads2k commented Jun 28, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: champtar, deads2k, neolit123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 28, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4036b6f into kubernetes:master Jun 28, 2023
12 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jun 28, 2023
@champtar champtar deleted the kubeadm-backdate-ca branch June 29, 2023 02:53
@champtar
Copy link
Contributor Author

While trying to cherry-pick this PR, older branch are missing #117791, should I send cherry-pick for this other PR first ?

@neolit123
Copy link
Member

While trying to cherry-pick this PR, older branch are missing #117791, should I send cherry-pick for this other PR first ?

odd, i thought that was backported. cc @nnmin-aws
but i don't think that change should be a blocker for this one. maybe a git conflict.

@champtar
Copy link
Contributor Author

While trying to cherry-pick this PR, older branch are missing #117791, should I send cherry-pick for this other PR first ?

odd, i thought that was backported. cc @nnmin-aws but i don't think that change should be a blocker for this one. maybe a git conflict.

sorry, I meant that I get a git conflict

@alexzielenski
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 11, 2023
k8s-ci-robot added a commit that referenced this pull request Aug 2, 2023
…8922-upstream-release-1.25

Automated cherry pick of #118922: kubeadm: backdate generated CAs
k8s-ci-robot added a commit that referenced this pull request Aug 2, 2023
…8922-upstream-release-1.26

Automated cherry pick of #118922: kubeadm: backdate generated CAs
k8s-ci-robot added a commit that referenced this pull request Aug 2, 2023
…8922-upstream-release-1.27

Automated cherry pick of #118922: kubeadm: backdate generated CAs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

7 participants